package com.cloud.Service.impl;


import com.cloud.Service.SysLogService;
import com.cloud.dao.SysLogDao;
import com.cloud.pojo.SysLog;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: Tangtao
 * @Date: 2022/5/12 9:11
 * @Description:
 * @ClassName:
 */
@Service
public class SysLogServiceImpl implements SysLogService {
    @Resource
    SysLogDao sysLogDao;

    @Override
    public int insertLog(SysLog entity) {
        // TODO Auto-generated method stub
        return sysLogDao.insertLog(entity);
    }

    @Override
    public List<SysLog> getLog() {
        String userId = UserInfoServiceImpl.getUserIdFromToken();
        return sysLogDao.getLog(userId);
    }
}
